Add some of the mechanical casts for gbser_win.cc.
authorrobertlipe <robertlipe@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Wed, 6 Feb 2013 19:50:27 +0000 (19:50 +0000)
committerrobertlipe <robertlipe@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Wed, 6 Feb 2013 19:50:27 +0000 (19:50 +0000)
gpsbabel/defs.h
gpsbabel/gbser_win.cc

index 5883400e7d42c148ded933d74a4753a17e431204..962765288c4e6ef1c8de2c412e423729d84195d9 100644 (file)
@@ -575,8 +575,8 @@ class route_head {
     rte_name(NULL),
     rte_desc(NULL),
     rte_url(NULL),
-    rte_num(NULL),
-    rte_waypt_ct(NULL),
+    rte_num(0),
+    rte_waypt_ct(0),
     fs(NULL),
     cet_converted(0),
     line_width(-1),
index e60850074e50731d2c4816eeb3c4f3399b4b5f59..ac1cfacc0b0ac50318a30a163ed2ec71ac4744d2 100644 (file)
@@ -168,7 +168,7 @@ const char* fix_win_serial_name(const char* comname)
 void* gbser_init(const char* port_name)
 {
   HANDLE comport;
-  gbser_handle* h = xcalloc(1, sizeof(*h));
+  gbser_handle* h = (gbser_handle*) xcalloc(1, sizeof(*h));
   const char* xname = fix_win_serial_name(port_name);
 
   gbser__db(2, "Translated port name: \"%s\"\n", xname);
@@ -259,7 +259,7 @@ unsigned gbser__read_buffer(void* handle, void** buf, unsigned* len)
 {
   gbser_handle* h = gbser__get_handle(handle);
   unsigned count = *len;
-  unsigned char* cp = *buf;
+  unsigned char* cp = (unsigned char *) *buf;
   if (count > h->inbuf_used) {
     count = h->inbuf_used;
   }
@@ -357,7 +357,7 @@ int gbser_write(void* handle, const void* buf, unsigned len)
 {
   gbser_handle* h = gbser__get_handle(handle);
   DWORD nwritten;
-  const char* bp = buf;
+  const char* bp = (const char *) buf;
   /* Not sure we need to spin here - but this'll work even if we don't */
   while (len > 0) {
     if (!WriteFile(h->comport, bp, len, &nwritten, NULL)) {
@@ -426,7 +426,7 @@ int gbser_read_line(void* handle, void* buf,
                     unsigned len, unsigned ms,
                     int eol, int discard)
 {
-  char* bp = buf;
+  char* bp = (char *) buf;
   unsigned pos = 0;
   hp_time tv;
   get_time(&tv);